<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 2.1内嵌式，写在head内 -->
    <script type="text/javascript">
        alert("1111");
    </script>
    <!-- 3.外链式 -->
    <script src="./js/1.js引入位置.js"></script>
</head>
<body>
    <!-- 1.行内式 -->
    <button onclick="alert('hello javascript')">点击</button>
    
    <!-- 2.2内嵌式，写在body中 -->
    <script type="text/javascript">
        alert("22222");
    </script>
</body>
</html>